﻿@model BlackBird.Models.FuKuanDanModel
@using BlackBird.Resources
@using BlackBird.Models

@{
    ViewBag.Title = "Create";
}

@section title_toolbar
{
    <nav>
        <ul id="button_command">
            <li><span class="returnHome">@Html.ActionLink(BBStrings.ReturnHome, "Index", "Home")</span></li>
        </ul>
    </nav>
}

@using (Html.BeginForm(MVC.FuKuanDan.ResolveFuKuanDan(), FormMethod.Post))
{
    @Html.ValidationSummary(true)

        <table id="fukuanhost"  class = "noborder">
            <colgroup>
                <col class="fkd_header"/>
                <col class="fkd_common"/>
                <col class="fkd_header" />
                <col class="fkd_common"/>
                <col class="fkd_header"/>
                <col class="fkd_common"/>
            </colgroup>
            <tbody>
                <tr class = "noborder">
                    <td>@Html.LabelFor(model => model.ProjectName)</td>
                    <td colspan = "3" class="threecolumn">@Html.EditorFor(model => model.ProjectName)</td>
                    <td>@Html.LabelFor(model => model.ShengQingRiQi)</td>
                    <td>@Html.DisplayFor(model => model.ShengQingRiQi)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.ZhiFuDanWei)</td>
                    <td colspan ="3"  class="threecolumn">@Html.EditorFor(model => model.ZhiFuDanWei)</td>
                    <td>@Html.LabelFor(model => model.YongTu)</td>
                    <td>@Html.EditorFor(model => model.YongTu)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.LeiJiFaShengE)</td>
                    <td>@Html.EditorFor(model => model.LeiJiFaShengE)</td>

                    <td>@Html.LabelFor(model => model.LeiJiZhiFuE)</td>
                    <td>@Html.EditorFor(model => model.LeiJiZhiFuE)</td>

                    <td>@Html.LabelFor(model => model.QiMoYuE)</td>
                    <td>@Html.EditorFor(model => model.QiMoYuE)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.ShenQingJinE)</td>
                    <td colspan = "5" class="fivecolumn">@Html.EditorFor(model => model.ShenQingJinE)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.CaiWuZhuGuan)</td>
                    <td colspan = "5" class="fivecolumn third_step">@Html.EditorFor(model => model.CaiWuZhuGuan)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.GongSiLingDao)</td>
                    <td colspan = "5" class="fivecolumn fourth_step">@Html.EditorFor(model => model.GongSiLingDao)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.FuKuanFangShi)</td>
                    <td>@Html.EditorFor(model => model.FuKuanFangShi)</td>

                    <td>@Html.LabelFor(model => model.KaiHuHang)</td>
                    <td colspan = "3" class="threecolumn"> @Html.EditorFor(model => model.KaiHuHang)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.HuMing)</td>
                    <td colspan = "2" class="twocolumn"> @Html.EditorFor(model => model.HuMing)</td>

                    <td> @Html.LabelFor(model => model.ZhangHao)</td>
                    <td colspan = "2" class="twocolumn">@Html.EditorFor(model => model.ZhangHao)</td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(model => model.LianXiRenDianHua)</td>
                    <td colspan = "5" class="fivecolumn">@Html.EditorFor(model => model.LianXiRenDianHua)</td>
                </tr>
                <tr>
                    <td> @Html.LabelFor(model => model.CaiWuBianLiJieGuo)</td>
                    <td colspan = "5" class="fivecolumn"> @Html.EditorFor(model => model.CaiWuBianLiJieGuo)</td>
                </tr>
                <tr class = "noborder">
                    <td>@Html.LabelFor(model => model.TianBiaoRen)</td>
                    <td>@Html.DisplayFor(model => model.TianBiaoRen)</td>

                    <td>@Html.LabelFor(model => model.BuMenFuZeRen)</td>
                    <td>@Html.DisplayFor(model => model.BuMenFuZeRen)</td>

                    <td>@Html.LabelFor(model => model.BianHao)</td>
                    <td>@Html.DisplayFor(model => model.BianHao)</td>
                </tr>
            </tbody>
        </table>
        
        @Html.HiddenFor(v => v.Id)
        @Html.HiddenFor(v => v.ProjectId)
        @Html.HiddenFor(v => v.Status)

        <!--这些元素在前面DisplayFor的情况下是无法通过Form post到server 端的-->
        @Html.HiddenFor(v => v.ProjectName)
        @Html.HiddenFor(v => v.ShengQingRiQi)
        @Html.HiddenFor(v => v.TianBiaoRen)
        @Html.HiddenFor(v => v.BuMenFuZeRen)
        @Html.HiddenFor(v => v.BianHao)
        @Html.HiddenFor(v => v.CreateUser_idUser)

        <!--为javascrip提供数据源-->
        @Html.HiddenFor(v => v.CurrentStep)
        <span id="canOperateFuKuanDan" data-value="@ViewData["canOperateFuKuanDan"]"></span>
    
        <br/>
        <br/>
        <p>
            @if (ViewData["canOperateFuKuanDan"].ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
            {
                if (Model.Status == SupportTypeStatus.CaoGao)
                {
            <input type="submit" value="@BBStrings.Create" name="Action" />  
                }
                if (Model.Status == SupportTypeStatus.ShengHeZhong)
                {
            <input type="submit" value="@BBStrings.ShenHeResult_Pass" name="Action"/>
            <input type="submit" value="@BBStrings.ShenHeResult_Fail" name="Action"/>
                }
            }
            
            @if (Model.Status == SupportTypeStatus.ShenHeWanCheng
                && ViewData["isTianbiaoyuan"].ToString().Equals("True", StringComparison.OrdinalIgnoreCase))
            {
            <input type="submit" value=@BBStrings.ZuoFei name="Action"/>
            <input type="submit" value=@BBStrings.GuiDang name="Action"/>
             }

            <input type="submit" value="@BBStrings.Close" name="Action" />  
        </p>
}

